﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using TjZheng.Framework;

namespace TjZheng.Logger.Business
{
    public partial class BizLogCategory
    {
        public override int DeleteIDString(string ids)
        {
            var objPowerInfoList = this.GetList(string.Format("Id in({0})", ids));
            int result = 0;
            if (objPowerInfoList.IsNull())
            {
                return result;
            }
            return (int)this.ExecuteTransation(() =>
            {
                string condition = string.Empty;
                foreach (var objPowerInfo in objPowerInfoList)
                {
                    condition = string.Format("IDPath like '{0}%'", objPowerInfo.IDPath);
                    result = this.Delete(condition);
                }
                return result;
            });
        }
    }
}
